package com.jr.service.impl;


import com.jr.entity.Enterprise;
import com.jr.entity.Job;
import com.jr.entity.UserJobEnterprise;
import com.jr.mapper.EnterpriseDao;
import com.jr.service.EnterpriseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


/**
 * 企业表
 *
 * @author Snoopy
 * @since 1.0.0 2022-12-31
 */
@Service
public class EnterpriseServiceImpl  implements EnterpriseService {
    @Autowired
    private EnterpriseDao enterpriseDao;

    /**
     * @description:查询单个企业信息
     * @author: 李泽涛
     * @date: 2023/1/10 13:23
     * @param: [eid]
     * @return: com.jr.entity.Enterprise
     **/
    @Override
    public Enterprise selectEnterpriseOne(int eid) {
        return enterpriseDao.selectEnterprise(eid);
    }

    /**
     * @description:查询企业对应工作集合
     * @author: 李泽涛
     * @date: 2023/1/10 13:24
     * @param: [eid]
     * @return: com.jr.entity.Enterprise
     **/
    @Override
    public List<Job> selectEnterpriseJobs(int eid) {
        return enterpriseDao.selectEnterpriseWithJobs(eid);
    }

    /**
     * @description:根据工作id查询对应状态
     * @author: 李泽涛
     * @date: 2023/1/10 13:26
     * @param: [map]
     * @return: java.lang.String
     **/
    @Override
    public String queryStatusById(Map<String, String> map) {
        return enterpriseDao.selectStatusById(map);
    }

}